
import myaxios from "../MyAxios";
import URLENV from "../BaseUrl";

let BMDURL = URLENV.BMDURL;
// let BMDURL = "http://localhost:3010/";
// let BMDURL= 'https://web.codeboy.com/bmdapi/'

const reservatApi = {
  
  /**
   *  发送http请求，删除，必须得获取当前点击的用户的user_id，用传参的方式
   * @param {object} params 参数列表：{user_id:用户user_id}
   */
  deleteUserById(params) {
    let url = BMDURL + "/user/del";
    return myaxios.post(url, params);
  },

  /**
   *模糊查询:通过昵称关键字查询列表
   * @param {object} params 参数列表 
   */
  queryReservaByNameLike(params) {
    let url = BMDURL + "reservat/name";
    return myaxios.post(url, params);
  },

  /**
   *预约列表（店铺）
   * @param {object} params 参数列表 
   */
  queryUnReservat(params) {
    let url = BMDURL + "store/reserva";
    return myaxios.post(url, params);
  },


  // 修改预约
  queryFinishReserva(params){
    let url = BMDURL + 'store/chang-reserva'
    return myaxios.post(url, params);
  },

  // 失效预约
  queryExpireReserva(params){
    let url = BMDURL + 'store/expire-reserva'
    return myaxios.post(url, params);
  },

   /**
   *预约列表（带页面）
   * @param {object} params 参数列表 
   */
   queryReservat(params) {
    let url = BMDURL + "reserva";
    return myaxios.get(url, params);
  },
};
export default reservatApi;